﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsGame1
{
    class MathTools
    {
        public static readonly MathTools Instance = new MathTools();

        private Random rd;
        private MathTools()
        {
            rd = new Random();
        }

        public int GetRandomNumber()
        {
            return GetRandomNumber(-10, 10);
        }

        public int GetRandomNumber(int min, int max)
        {
            int number = rd.Next(min, max);
            if (number == 0)
            {
                return GetRandomNumber(min, max);
            }
            return number;
        }
    }
}
